package com.example.liangxinxin;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.LinearLayoutCompat;
public class MainAdapter extends AppCompatActivity {

    private LinearLayoutCompat WeatherView;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //实例化控件
        setContentView(R.layout.activity_main1);
        //初始化数据
        WeatherView = findViewById(R.id.WeatherView);

        WeatherView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainAdapter.this,DataActivity.class);
                startActivity(intent);
            }
        });
    }
}
